home *** CD-ROM | disk | FTP | other *** search
- ** END HEADER -- do not remove this line
- //
- // Generated on 09/18/97
- //
- parameter formObj, popupName
- new FtreePOPUP(formObj, popupName)
-
- class FtreePOPUP(formObj, popupName) of POPUP(formObj, popupName)
- with (this)
- left = 0
- top = 0
- trackRight = true
- endwith
-
-
- this.MENUEDIT = new MENU(this)
- with (this.MENUEDIT)
- onClick = class::MENUEDIT_ONCLICK
- text = "Edit..."
- endwith
-
- this.MENUDELETE = new MENU(this)
- with (this.MENUDELETE)
- onClick = class::MENUDELETE_ONCLICK
- text = "Delete..."
- endwith
-
-
- // {Linked Method} form.root.menuedit.onClick
- function MENUEDIT_onClick
- local thisForm, item, bRead
- thisForm = this.parent.parent
- item = thisForm.fleetTree.selected
- bRead = false
- if ( TYPE("this.parent.parent.app") == "O" )
- bRead := thisForm.app.openScheduleAsDialog( item )
- endif
- return ( bRead )
-
- // {Linked Method} form.root.menudelete.onClick
- function MENUDELETE_onClick
- local item, bDelete, q
- item = this.parent.parent.fleetTree.selected
- bDelete = false
- if ( TYPE("this.parent.parent.app") == "O" )
- if ( MSGBOX("You are about to delete the selected flight." ;
- + CHR(13) ;
- + "Click Yes to delete the selected flight from the schedule.", ;
- "Alert", ;
- 4) == 6 )
- q = new Query()
- with ( q )
- database := this.parent.parent.qFTree.database
- sql := 'select * from "schedule.dbf" schedule'
- active := true
- endwith
- q.rowset.applyLocate('"Flight Date" = ' + item.sFlightDate + ;
- ' and "Flight ID" = ' + INT(VAL( item.sFlightID ) ) + ;
- ' and "Aircraft ID" = ' + INT(VAL( item.sAircraftID ) ) )
- if ( not q.rowset.endOfSet )
- bDelete := q.rowset.delete()
- item.release()
- endif
- q.active := false
- endif
- endif
- return ( bDelete )
-
- endclass
-